home *** CD-ROM | disk | FTP | other *** search
- on keyDown
- global gOrder, gWhoBuzzedIn, gScoreList, gValue, gSoundFXChannel, gPathToSound, fileDelimiter, gVoiceChannel, gCurrQString, gNumPlayers
- set jKey to the keyPressed
- set jRight to 0
- case jKey of
- "1":
- if getAt(gOrder, 1) = 1 then
- set jRight to 1
- end if
- "2":
- if getAt(gOrder, 2) = 1 then
- set jRight to 1
- end if
- "3":
- if getAt(gOrder, 3) = 1 then
- set jRight to 1
- end if
- otherwise:
- exit
- end case
- if jRight then
- sound playFile gSoundFXChannel, gPathToSound & "soundFX" & fileDelimiter & getAt(["liteclap", "medclap", "loudclap"], random(3)) & ".aif"
- sound playFile gVoiceChannel, gPathToSound & "qanda" & fileDelimiter & "CH" & gCurrQString & "_1.aif"
- setAt(gScoreList, gWhoBuzzedIn, getAt(gScoreList, gWhoBuzzedIn) + (gValue * 100))
- repeat while soundBusy(gVoiceChannel)
- end repeat
- sound stop gSoundFXChannel
- go("Play Round")
- else
- setAt(gScoreList, gWhoBuzzedIn, getAt(gScoreList, gWhoBuzzedIn) - (gValue * 100))
- go("AHNN!")
- end if
- set the text of field "player1 score" to string(getAt(gScoreList, 1))
- set the text of field "player2 score" to string(getAt(gScoreList, 2))
- set the text of field "player3 score" to string(getAt(gScoreList, 3))
- end
-